Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBP: Support new dataSource property #2267

Merged
merged 15 commits into from
Feb 29, 2024
Merged

DBP: Support new dataSource property #2267

merged 15 commits into from
Feb 29, 2024

Conversation

Bunn
Copy link
Collaborator

@Bunn Bunn commented Feb 26, 2024

Task/Issue URL: https://app.asana.com/0/1204167627774280/1206602738361283/f

Description:
Add new datasource property support

Steps to test this PR:
(Use C-S-S from main to test this)

  1. Do a full scan/opt-out on an old broker with old JSON, see if it works
  2. Change the JSON (you can use DBP debug mode to make it easier) and add a datasource to an action, like:
  • "dataSource": "extractedProfile",
  • "dataSource": "userProfile",

ex:

          "actionType": "navigate",
          "id": "cf670748-0509-4a78-8b46-d8cf7135538e",
          "dataSource": "extractedProfile",

Check if we're correctly sending the dataSource property back to CCF
You can do this by breakpointing here

func pushAction(method: CCFSubscribeActionName, webView: WKWebView, params: Encodable) {


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 26, 2024
@Bunn Bunn marked this pull request as ready for review February 28, 2024 14:49
@Bunn Bunn removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 28, 2024
@Bunn Bunn requested a review from jotaemepereira February 28, 2024 15:20
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	LocalPackages/DataBrokerProtection/Package.swift
#	LocalPackages/LoginItems/Package.swift
#	LocalPackages/NetworkProtectionMac/Package.swift
#	LocalPackages/PixelKit/Package.swift
#	LocalPackages/SubscriptionUI/Package.swift
#	LocalPackages/SwiftUIExtensions/Package.swift
#	LocalPackages/SyncUI/Package.swift
#	LocalPackages/SystemExtensionManager/Package.swift
#	LocalPackages/XPCHelper/Package.swift
@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 28, 2024
Copy link
Contributor

github-actions bot commented Feb 28, 2024

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against f125094

Copy link
Collaborator

@jotaemepereira jotaemepereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bunn I have some questions about some broker JSON files

@@ -45,7 +45,9 @@
"separator": ","
},
"profileUrl": {
"selector": ".link-to-details"
"selector": ".link-to-details",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Here, we added the identifier, but we didn’t bump the version on this file. What will happen to users who find this? Or we didn’t release the last change for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I think this needs to be bumped to 0.1.6.
@brianhall, wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole versioning thing was inherited and needs to be defined a little better, I'll work on it. 😄 Technically the identifier isn't visible to any client, so it won't matter if they see it, but happy for this to get bumped to 0.1.6, I'll add a commit with all changes based on the feedback in a minute.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianhall Let me change the wording. What I meant with “users who find this”, I meant that if a user has this extract JSON broker version on their computers, they will not get this identifier change, because for them it will be the same version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianhall, I believe it matters because we only parse/save the new JSON if there's a version change. The JSON is not always read from the file; we store it serialized in the DB. Therefore, if we don't bump the version here, we won't send the identifier to C-S-S.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks both! That's useful context, understood.

Copy link
Collaborator Author

@Bunn Bunn Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a commit with all changes based on the feedback in a minute.

Just to confirm, are you doing a commit on this branch or in the json repo for me to fetch the changes here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry. Just bumped a commit here and will reflect back in the broker json repo.

{
"name": "FastPeopleSearch",
"url": "fastpeoplesearch.com",
"version": "0.1.5",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ This is weird; why is this a new broker, but the version is 0.1.5? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is simply due to the nature of how the generator works; it sets the same version for all of them. I don't see it as an issue

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's right @Bunn. I think we need to decide whether the versioning is "a versioned release of one or more changes" (the mode I've been operating under) or if each json file gets its own individual version. I've also been operating with the former mental model.

@@ -1,7 +1,7 @@
{
"name": "Inforver",
"url": "inforver.com",
"version": "0.1.4",
"version": "0.1.5",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ There was no change in Verecor, and I do not see the identifier. Should it be here?

Copy link
Collaborator

@brianhall brianhall Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inforver now redirects to persontrust.com, so I didn't bother updating the identifier, it's ok as-is.

@@ -1,7 +1,7 @@
{
"name": "OfficialUSA",
"url": "officialusa.com",
"version": "0.1.4",
"version": "0.1.5",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ The same here, we are not doing any changes to this broker

Copy link
Collaborator

@jotaemepereira jotaemepereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bunn Tests are not compiling on this PR

@Bunn
Copy link
Collaborator Author

Bunn commented Feb 28, 2024

@jotaemepereira I fixed the tests. Other than that, I believe that updating the version of the JSON files to take advancedbackgroundchecks.com changes into consideration is the only thing left right? The discussion about versioning is being held here

@Bunn Bunn requested a review from jotaemepereira February 28, 2024 20:43
Copy link
Collaborator

@jotaemepereira jotaemepereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍🏼 . Thanks for addressing the comments

Bunn added 3 commits February 29, 2024 11:07
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	LocalPackages/DataBrokerProtection/Package.swift
#	LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/Actions/EmailConfirmation.swift
#	LocalPackages/NetworkProtectionMac/Package.swift
#	LocalPackages/SubscriptionUI/Package.swift
@github-actions github-actions bot removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 29, 2024
@Bunn Bunn merged commit abe67a7 into main Feb 29, 2024
17 checks passed
@Bunn Bunn deleted the bunn/dbp/datasource branch February 29, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants